#include "socketenv.hpp"

SocketEnv *SocketEnv::_instance = nullptr;
CriticalSectionWrapper SocketEnv::_csw = CriticalSectionWrapper();

SocketEnv *SocketEnv::getinstance()
{
	_csw.Lock();
	if (_instance == nullptr)
		_instance = new SocketEnv;
	_csw.UnLock();
	return _instance;
}

SocketEnv::~SocketEnv()
{
	WSACleanup();
}

